import { ref, computed } from 'vue';
import { defineStore } from 'pinia';
import { getStore, setStore } from '@/utils/utils';

export const useLangStore = defineStore('lang', () => {
    const lang = ref(getStore('esign_websit_language') || 'en-US');
    const setLang = (val: string) => {
        lang.value = val;
        setStore('esign_websit_language', val);
    };

    return { lang, setLang };
});
